﻿using Prism.DryIoc;
using Prism.Ioc;
using Prism_DryIoc_WPFDemo.Views;
using System.Windows;

namespace Prism_DryIoc_WPFDemo
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : PrismApplication
    {
        protected override Window CreateShell()
        {
            return Container.Resolve<MainWindow>();
        }

        protected override void InitializeShell(Window shell)
        {
            if (Container.Resolve<Login>().ShowDialog() == false)
                Application.Current?.Shutdown();
            else base.InitializeShell(shell);
        }

        protected override void RegisterTypes(IContainerRegistry containerRegistry)
        {

        }
    }
}
